//https://segmentfault.com/a/1190000002519828

void CreateDlistR(DLNode *&L,int a[],int n)
{
	DLNode *s,*r;
	int i;
	L=(DLNode*)malloc(sizeof(DLNode));
	L->next = NULL;

	r=L;

	for(int i=1;i<=n;i++)
	{
		s=(DLNode*)mallic(sizeof(DLNode));
		r->next=s;
		s->prior=r;
		r=s;
	}
	r->next=NULL;
}

DLNode* FindNode(DLNode *C,int x)
{
	DLNode *p =C->next;

	while(p!=NULL)
	{
		if(p->data==x)
		{
			break;
		}
		p->p->next;
	}
	return p;
}

//insert
s->next=p->next;
s->prior=p;
p->next=s;
s->next->prior=s;

//delete
q=p->next;
p->next=q->next;
q->next->prior=p;//p->next->prior=p;//I think it's right too
free(q);



